package com.changgou.order;

import com.changgou.order.interceptor.FeignInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableFeignClients(basePackages ={ "com.changgou.order.feign","com.changgou.user.feign"})
@EnableEurekaClient
public class OrderWebApplication {
    public static void main(String[] args) {
        SpringApplication.run( OrderWebApplication.class);
    }
@Bean
    public FeignInterceptor feignInterceptor(){
        return new FeignInterceptor();
}
}
